package com.itheima.service;

import com.itheima.dao.BookMapper;
import com.itheima.pojo.Book;
import com.itheima.util.SessionFactoryUtils;

import java.util.List;

public class BookService {
    public List<Book> findAllBooks(){
        //将所有书籍信息返回给web层
        BookMapper bookMapper = SessionFactoryUtils.getSession().getMapper(BookMapper.class);
        return bookMapper.findAllBooks();
    }
}
